from dataclasses import dataclass, field, astuple, asdict

def gen_hair_kind():
    color = [ "R", "B" ]
    return color

@dataclass(frozen=True)
class DataDog:
    eye: str = "2"
    leg: str = "4"
    color: str = field(default_factory=gen_hair_kind)
    foreign: bool = field(default=True, repr=False)


def print_data_dog():
    dataDog = DataDog()
    print(astuple(dataDog))
    print(asdict(dataDog))

    print(type(dataDog.color))
    for c in dataDog.color:
        print(c)


class Dog:
    def __init__(
       self,
       eye:str,
       leg:str,
       color: float,
       foreign:bool,
       ) -> None:
        self.eye = eye
        self.leg = leg 
        self.color = color
        self.foreign = foreign
    def __str__(self) -> str:
        return f"{self.eye}, {self.leg}, {self.color}, {self.foreign}"

def print_dog():
    dog = Dog("2", "4", ["R", "G"], True)
    print(dog)

if __name__ == "__main__":
    print_data_dog()
    print_dog()

    
